=javascript_include_tag 'product_list'
=javascript_include_tag 'free_goods_info'
=javascript_include_tag 'shopping_cart'
%header.header_heigth
  .margin-div
    .header.div
      .margin
        .div.line-height
          %a.div_margin{:href => "/list/product_list"}
            %b Let's Go
        .header.div
          %a.div_margin{:href => "/goods/home"} 主页
        .div
          %a.div_margin{:href => "/list/product_list"} 商品列表
    .div.float.color_b
      %a.a_color.a-margin{:href => "/cart/shopping_cart"}
        = image_tag 'white.png'
        购物车(
        #total_goods_number.div> 0
        )
.table
  .br5
    .m-1
      .inventory-margin 购物清单
    %table#show_goods.bcc
      %tr.th-font
        %td.heigth104 分类
        %td.heigth145 名称
        %td.heigth145 单价(元)
        %td.heigth104 单位
        %td.heigth260 数量
        %td.heigth290 小计
      -CartGood.all.each do |i|
        %tr.tr50{:id => "#{i.name}tr"}
          %td
            =i.sort
          %td
            =i.name
          %td
            =i.price
          %td
            =i.unit
          %td
            %button.less_button{:onclick =>"less('#{i.name}')" } -
            %button.input-button{:id => "#{i.name}_count"}
              =i.count
            %button.plus_button{:onclick => "plus('#{i.name}')"} +
          %td{:id => "#{i.name}control"}
            .div{:id => "#{i.name}price"}
              =((i.count-i.free_count)*i.price)
            元
    .margin-right20
      .p-margin.div
        总计:
        #count.div
          =@total_price
        元
    .margin-right20
      %a.a-payment{:href => "http://localhost:3000/payment/payment"}
        %b 付款